<style>
<!--
.textbox-label {width: 100px;}
.bcparam {border:1px #625f62 dotted;padding:5px 0px;border-radius:6px;}
-->
</style>
<div class="easyui-panel" data-options="fit:true,title:'任务编辑'" style="min-width:550px;">
	<form id="kform" class="easyui-form" style="margin:0px auto;width:70%;">
		<div>
			<input name="name" class="easyui-textbox" data-options="label:'任务名称:',labelAlign:'right',required:true" style="width:95%;"/>
	    </div>
	    <div>
			<input name="scriptName" class="easyui-textbox" data-options="label:'脚本名称:',labelAlign:'right',readonly:true,required:true" style="width:95%;"/>
	    </div>
		<div>
			<input name="scriptPath" class="easyui-textbox" data-options="label:'脚本路径',labelAlign:'right',readonly:true,required:true" style="width:95%;"/>
	    </div>
	    <div>
			<input name="cron" id="bccron" class="easyui-textbox" data-options="label:'cron表达式',labelAlign:'right',buttonText:'执行计划',required:true" style="width:95%;"/>
	    </div>
	    <div>
    		<select name="logLevel" class="easyui-combobox" data-options="label:'日志级别',labelAlign:'right',panelHeight:'auto',required:true" style="width:300px;">
    			<option value="Basic">基本日志</option>
    			<option value="Detailed">详细日志</option>
    			<option value="Error">错误日志</option>
    			<option value="Debug">调试日志</option>
    			<option value="Minimal">最小日志</option>
    			<option value="Rowlevel">行级日志（非常详细）</option>
    			<option value="Nothing">无日志</option>
    		</select>
    	</div>
    	<div class="bcparam" bcseq="0"></div>
    	<div>
    		<input name="describes" class="easyui-textbox" data-options="label:'描述:',labelAlign:'right',multiline:true,validType:['length[0,300]']" 
    			style="width:95%;height:80px;padding:5px;">
    	</div>
    	
    	<input name="id" type="hidden">
    	<input name="repId" type="hidden">
    	<input name="scriptType" type="hidden">
	</form>
	<div style="text-align:center;padding:5px">
		<a href="javascript:bcsubmit(false)" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
		<a href="javascript:bcclear()" class="easyui-linkbutton" data-options="iconCls:'icon-undo'">取消</a>
	</div>
</div>
<div id="bccronDia" class="easyui-dialog" data-options="title:'执行计划',closed:true,modal:true" style="width:300px;height:220px">
	<div id="bccronDiaHtml" style="width:100%;"></div>
</div>


<script type="text/javascript" src="cusy/js/task.js"></script>
<script type="text/javascript">
$(function() {
	$.get(reqRoute.taskById, { id: $("#aeditId").val() }, function(resultData) {
		if (resultData.status == successCode) {
			$(kform).form("load", resultData.data);
			cviewParam(resultData.data.params);
		} else {
			$.messager.alert("提示", resultData.message, "error");
		}
	});
	$(kform).form("disableValidation");
	bcparserCron();
});
</script>

